home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 April / Gamestar_61_2004-04_dvdb.iso / DVDStar / Editace / hltp.exe / {app} / Applications / QuArK / plugins / map4unrealed.py < prev    next >
Text File  |  2004-01-05  |  2KB  |  91 lines

  1. """   QuArK  -  Quake Army Knife
  2.  
  3. Plug-in which define the 4-views screen layouts.
  4. """
  5. #
  6. # Copyright (C) 2001 Andy Vincent
  7. # THIS FILE IS PROTECTED BY THE GNU GENERAL PUBLIC LICENCE
  8. # FOUND IN FILE "COPYING.TXT"
  9. #
  10.  
  11. #
  12. # $Header: /cvsroot/quark/runtime/plugins/map4unrealed.py,v 1.1 2001/02/05 20:09:11 aiv Exp $
  13.  
  14.  
  15. Info = {
  16.    "plug-in":       "4-Views Layout (UnrealEd Style)",
  17.    "desc":          "4-views Screen Layouts. (UnrealEd Style)",
  18.    "date":          "2 Feb 2001",
  19.    "author":        "Andy Vincent",
  20.    "author e-mail": "andyvinc@hotmail.com",
  21.    "quark":         "Version 6.2" }
  22.  
  23.  
  24. from quarkpy.mapmgr import *
  25. from plugins.map4viewslayout import FourViewsLayout
  26.  
  27. class FourViewsLayoutUEd(FourViewsLayout):
  28.  
  29.     shortname = "4 views (UnrealEd Style)"
  30.  
  31.     def buildscreen(self, form):
  32.  
  33.         #
  34.         # Build the base.
  35.         #
  36.  
  37.         self.buildbase(form)
  38.  
  39.         #
  40.         # Divide the main panel into 4 sections.
  41.         # horizontally, 2 sections split at 45% of the width
  42.         # vertically, 2 sections split at 55% of the height
  43.         #
  44.  
  45.         form.mainpanel.sections = ((0.45, ), (0.55,))
  46.  
  47.         #
  48.         # Put the XY view in the section (0,0) top-left
  49.         #
  50.  
  51.         self.ViewXY.section = (0,0)
  52.  
  53.         #
  54.         # Put the XZ view in the section (0,1) top-right
  55.         #
  56.  
  57.         self.ViewXZ.section = (1,0)
  58.  
  59.         #
  60.         # Put the YZ view in the section (1,1) bottom-right
  61.         #
  62.  
  63.         self.ViewYZ.section = (1,1)
  64.  
  65.         #
  66.         # The 3D view is in the section (1,0) bottom-left
  67.         #
  68.  
  69.         self.View3D.section = (0,1)
  70.  
  71.         #
  72.         # Link the horizontal position of the XZ view to that of the
  73.         # XY view, and the vertical position of the XZ and YZ views,
  74.         # and remove the extra scroll bars.
  75.         #
  76.  
  77.         self.sblinks.append((0, self.ViewXZ, 0, self.ViewXY))
  78.         self.sblinks.append((1, self.ViewXZ, 1, self.ViewYZ))
  79.         self.sblinks.append((1, self.ViewXY, 0, self.ViewYZ))
  80.         self.ViewYZ.flags = self.ViewYZ.flags &~ (MV_HSCROLLBAR | MV_VSCROLLBAR)
  81.         self.ViewXY.flags = self.ViewXY.flags &~ MV_HSCROLLBAR
  82.         
  83. LayoutsList.append(FourViewsLayoutUEd)
  84.  
  85. # ----------- REVISION HISTORY ------------
  86. # $Log: map4unrealed.py,v $
  87. # Revision 1.1  2001/02/05 20:09:11  aiv
  88. # Initial Release
  89. #
  90. #
  91.